Skip to main content

vaccination

Table Name: vaccination

The vaccination table stores information about vaccinations administered to children. It tracks vaccination details, status, and metadata for auditing and reporting purposes.


Columns

Column NameData TypeConstraintsDescription
vaccinationRecordNumint(11)Primary Key, Auto IncrementA unique identifier for each vaccination record.
childIdint(11)Not Null, Foreign KeyLinks to the child table, indicating the child who received the vaccination.
createdDatedatetimeNullableThe date and time when the vaccination record was created.
descriptionvarchar(255)NullableA brief description of the vaccination event.
epiNumbervarchar(255)NullableA unique number assigned to the vaccination event, typically for reporting or tracking purposes.
heightfloatNullableThe height of the child during the vaccination event (if recorded).
lastEditedDatedatetimeNullableThe date and time when the record was last edited.
preferredReminderTimingvarchar(255)NullableThe preferred time for sending vaccination reminders.
reasonNotTimelyVaccinationvarchar(255)NullableThe reason why the vaccination was not administered on time, if applicable.
vaccinationCenterIdint(11)Nullable, Foreign KeyLinks to the vaccinationcenter table, indicating the location of the vaccination event.
vaccinationDatedatetimeNullableThe actual date and time of the vaccination.
vaccinationDuedatedatetimeNot NullThe scheduled date for the vaccination.
vaccinationStatusvarchar(20)Not NullThe status of the vaccination (e.g., PENDING, COMPLETED, MISSED).
vaccinatorIdint(11)Nullable, Foreign KeyLinks to the vaccinator table, indicating the individual who administered the vaccination.
vaccineIdsmallint(6)Not Null, Foreign KeyLinks to the vaccine table, identifying the type of vaccine administered.
weightfloatNullableThe weight of the child during the vaccination event (if recorded).
createdByUserIdint(11)Nullable, Foreign KeyLinks to the user table, identifying the user who created the record.
lastEditedByUserIdint(11)Nullable, Foreign KeyLinks to the user table, identifying the user who last edited the record.
isVaccinationCenterChangedtinyint(1)NullableIndicates whether the vaccination center was changed (1 for yes, 0 for no).
isFirstVaccinationtinyint(1)NullableIndicates whether this was the child’s first vaccination (1 for yes, 0 for no).
hasApprovedLotterytinyint(1)NullableIndicates whether the child is approved for a lottery associated with the vaccination (1 for yes).
timelinessFactorsmallint(6)NullableA factor representing the timeliness of the vaccination event.
timelinessStatusvarchar(20)NullableThe timeliness status of the vaccination (e.g., ONTIME, LATE).
reasonVaccineNotGivenvarchar(255)NullableThe reason why the vaccine was not administered, if applicable.
vaccinationEventTypevarchar(255)NullableThe type of vaccination event (e.g., ROUTINE, CAMPAIGN).
isImmunizedByLHWtinyint(1)NullableIndicates whether the vaccination was administered by a Lady Health Worker (LHW) (1 for yes, 0 for no).
vaccinationRefusaldatedatetimeNullableThe date when the vaccination was refused, if applicable.

Indexes

  1. Primary Key: vaccinationRecordNum
    • Ensures each record is uniquely identifiable.
  2. Foreign Key Indexes:
    • vaccination_childId_child_mappedId_FK: Optimizes lookups for childId.
    • vaccination_vaccinatorId_vaccinator_mappedId_FK: Optimizes lookups for vaccinatorId.
    • vaccination_vaccinationCenterId_vaccinationcenter_mappedId_FK: Optimizes lookups for vaccinationCenterId.
    • vaccination_vaccineId_vaccine_vaccineId_FK: Optimizes lookups for vaccineId.
    • vaccination_createdByUserId_user_mappedId_FK: Optimizes lookups for createdByUserId.
    • vaccination_lastEditedByUserId_user_mappedId_FK: Optimizes lookups for lastEditedByUserId.
  3. Additional Indexes:
    • vaccination_createdDate: Optimizes queries based on the creation date of records.
    • vaccination_lastEditedDate: Optimizes queries based on the last edited date of records.
    • vaccination_vaccinationdate: Optimizes queries based on vaccination date.
    • idx_vaccinationStatus: Optimizes queries filtering by vaccination status.
    • idx_vaccination_epiNumber: Optimizes queries filtering by EPI number.

Foreign Key Relationships

  1. child table:
    • childId: Links to child(mappedId) to associate the vaccination record with a child.
  2. user table:
    • createdByUserId: Links to user(mappedId) to track the creator of the record.
    • lastEditedByUserId: Links to user(mappedId) to track who last edited the record.
  3. vaccinationcenter table:
    • vaccinationCenterId: Links to vaccinationcenter(mappedId) to specify the vaccination location.
  4. vaccinator table:
    • vaccinatorId: Links to vaccinator(mappedId) to identify the person administering the vaccine.
  5. vaccine table:
    • vaccineId: Links to vaccine(vaccineId) to specify the vaccine administered.

Usage Notes

  • Purpose:

    • Tracks vaccination events for children, including timeliness, center information, and outcomes.
    • Useful for reporting, auditing, and ensuring compliance with vaccination schedules.
  • Timeliness and Status:

    • Columns such as timelinessFactor, timelinessStatus, and reasonNotTimelyVaccination help evaluate and document vaccination delays.
  • Integration:

    • Strongly integrated with other tables like child, vaccine, and vaccinator to provide comprehensive vaccination records.
  • Event Management:

    • The table captures detailed event metadata, including vaccinationEventType, isFirstVaccination, and isImmunizedByLHW.